<template>
    <div id="app">
        <MusicItem :item="music"></MusicItem>
    </div>
</template>

<script>
import axios from 'axios';
import MusicItem from '../components/Music'
    export default {
        name: 'App',
        components:{
            MusicItem
        },
        data(){
            return {
                music:[]
            }
        },
        mounted(){
            console.log(this)
            var {id} = this.$route.query;
            let url = `http://120.25.251.98:4000/playlist/detail?id=${id}`
            axios.get(url).then(res=>{
                console.log(res)
            this.music = res.data.playlist;
            })
        },
        
    }
</script>

<style  scoped>
.img{
    width: 100px;
    height: 100px;
}
</style>